<!--<script charset="utf-8" src="/public/assets/script/kindeditor-4.1.10/kindeditor-min.js"></script>
<script charset="utf-8" src="/public/assets/script/kindeditor-4.1.10/lang/zh_CN.js"></script>
<script charset="utf-8" src="/public/assets/script/kindeditor-4.1.10/php/upload_json.php"></script>
<script>
    var editor;
    KindEditor.ready(function(K) {
        editor = K.create('textarea', {
                allowFileManager : true,
                afterBlur: function(){this.sync();}
        });
    }); 
</script>-->
<link rel="stylesheet" href="/public/assets/sysadmin/mylzp/css/jquery-ui.css">
<script type="text/javascript" src="/public/assets/sysadmin/mylzp/js/jquery-ui.js"></script>
<style>
select{padding: 5px;margin-right: 20px;color: #555555;}
.col-sm-10 label{font-weight: 500;}
</style>
<section class="vbox">
    <section class="scrollable padder">
        <ul class="breadcrumb no-border no-radius b-b b-light pull-in">
            <li><a href="#"><i class="fa fa-home"></i> 系统管理</a></li>
            <li><a href="#">资料管理</a></li>
            <li class="active"><a href="#">酒店详细资料管理</a></li>
        </ul>
        <div class="m-b-md">
            <h3 class="m-b-none">酒店详细资料管理</h3>
        </div>
        <section class="panel panel-default">
            <div class="panel-body">
            <form class="form-horizontal form-bordered form-validate" method="post" action="<?=$this->url('user/basicinfoEdit')?>" enctype="multipart/form-data" id="hotelform" >
                <div class="form-group" style="margin-top: 10px;">
                    <label class="col-sm-2 control-label"><span style="color:red;">* </span>最多可容纳人数：</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" name="data[maxNum]" value="<?=empty($rs)?'':$rs['maxNum']?>">
                    </div>
                </div>
                <div class="form-group" style="margin-top: 10px;">
                    <label class="col-sm-2 control-label"><span style="color:red;">* </span>最大层高：</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" name="data[maxFloor]" value="<?=empty($rs)?'':$rs['maxFloor']?>">
                    </div>
                </div>
                
                <div class="form-group" style="margin-top: 10px;">
                    <label class="col-sm-2 control-label"><span style="color:red;">* </span>客房数量：</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" name="data[guestNum]" value="<?=empty($rs)?'':$rs['guestNum']?>">
                    </div>
                </div>
                
                <div class="form-group" style="margin-top: 10px;">
                    <label class="col-sm-2 control-label"><span style="color:red;">* </span>开业时间：</label>
                    <div class="col-sm-10">
                        <input type="text" style="width:100px;" class="form-control sta" name="data[practiceTime]" readonly="" value="<?=empty($rs)?'':$rs['practiceTime']?>">
                    </div>
                </div>
                <div class="form-group" style="margin-top: 10px;">
                    <label class="col-sm-2 control-label"><span style="color:red;">* </span>停车容量：</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" name="data[parkNum]" value="<?=empty($rs)?'':$rs['parkNum']?>">
                    </div>
                </div>
                
                <div class="form-group" style="margin-top: 10px;">
                    <label class="col-sm-2 control-label"><span style="color:red;">* </span>会议厅：</label>
                    <div class="col-sm-10">
                        <label><input type="radio" value="2" name="data[meetNum]" <?=!empty($rs)&&$rs['meetNum']==2?'checked=""':''?> >有</label>
                        <label><input type="radio" value="1" name="data[meetNum]" <?=!empty($rs)&&$rs['meetNum']==1?'checked=""':''?> >无</label>
                    </div>
                </div>
                
                <div class="form-group" style="margin-top: 10px;">
                    <label class="col-sm-2 control-label"><span style="color:red;">* </span>宴会厅：</label>
                    
                    <div class="col-sm-10">
                        <label><input type="radio" value="2" name="data[dinnerNum]" <?=!empty($rs)&&$rs['dinnerNum']==2?'checked=""':''?> >有</label>
                        <label><input type="radio" value="1" name="data[dinnerNum]" <?=!empty($rs)&&$rs['dinnerNum']==1?'checked=""':''?> >无</label>
                    </div>
                </div>
                
                <div class="form-group" style="margin-top: 10px;">
                    <label class="col-sm-2 control-label"><span style="color:red;">* </span>装修风格：</label>
                    <div class="col-sm-10">
                        <?
                        foreach($pmsconfigs['renovation'] as $k=>$v){?>
                            <label><input type="checkbox" value="<?=$k+1?>" name="renovation[]"
                            <?
                            $renovation_th=0;
                            if($renovation){
                                foreach($renovation as $ka=>$va){
                                    if($va['configureId']==$k+1){
                                        $renovation_th=1;
                                    }
                                }
                            }
                            if($renovation_th==1){
                                echo 'checked=""';
                            }
                            ?>
                            /><?=$v?></label>
                        <?}
                        ?>
                    </div>
                </div>
                
                <input type="hidden" class="form-control" name="hotellogo" value="<?=empty($rs)?'':$rs['logo']?>">
                <script src="/public/assets/sysadmin/mylzp/js/bootstrap-fileupload.min.js"></script>
                <link rel="stylesheet" href="/public/assets/sysadmin/mylzp/css/fileuplod.css">
                <style>.btn-dark{background: #2e3e4e;}.btn-dark:hover{background: #25313e;}</style>
                <div class="form-group" style="margin-top: 10px;">
                    <label class="col-sm-2 control-label"><span style="color:red;">* </span>酒店主题图：</label>
                    <div class="col-sm-10">
                        <font color="red">图片大小4M以内；最佳像素600×400；支持的格式有：jpg、gif、png；</font>
                        <div class="fileupload fileupload-new" data-provides="fileupload">
                            <div class="fileupload-new thumbnail" style="width: 200px;height: 100px;text-align: center;line-height: 100px;"><img src="<?=!empty($rs)&&!empty($rs['logo'])?$rs['logo']:''?>" /></div>
                            <div class="fileupload-preview fileupload-exists thumbnail" style="width: 200px;height: 100px;text-align: center;"></div>
                            <div>
                                <span class="btn btn-file"><span class="fileupload-new">浏览</span><span class="fileupload-exists">重选</span>
            					<input type="file" name='imagefile' title="" />
            					</span>
                                <a href="#" class="btn fileupload-exists" data-dismiss="fileupload">移除</a>
                            </div>
                        </div>
                    </div>
                </div>
                
                <input type="hidden" class="form-control" name="healthimg" value="<?=empty($rs)?'':$rs['healthimg']?>">
                <div class="form-group" style="margin-top: 10px;">
                    <label class="col-sm-2 control-label"><span style="color:red;">* </span>卫生许可证：</label>
                    <div class="col-sm-10">
                        <div class="fileupload fileupload-new" data-provides="fileupload">
                            <div class="fileupload-new thumbnail" style="width: 200px;height: 100px;text-align: center;line-height: 100px;"><img src="<?=!empty($rs)&&!empty($rs['healthimg'])?$rs['healthimg']:''?>" /></div>
                            <div class="fileupload-preview fileupload-exists thumbnail" style="width: 200px;height: 100px;text-align: center;"></div>
                            <div>
                                <span class="btn btn-file"><span class="fileupload-new">浏览</span><span class="fileupload-exists">重选</span>
            					<input type="file" name='healthimg' title="" />
            					</span>
                                <a href="#" class="btn fileupload-exists" data-dismiss="fileupload">移除</a>
                            </div>
                        </div>
                    </div>
                </div>
                <input type="hidden" class="form-control" name="specialimg" value="<?=empty($rs)?'':$rs['specialimg']?>">
                <div class="form-group" style="margin-top: 10px;">
                    <label class="col-sm-2 control-label"><span style="color:red;">* </span>特种行业许可证：</label>
                    <div class="col-sm-10">
                        <div class="fileupload fileupload-new" data-provides="fileupload">
                            <div class="fileupload-new thumbnail" style="width: 200px;height: 100px;text-align: center;line-height: 100px;"><img src="<?=!empty($rs)&&!empty($rs['specialimg'])?$rs['specialimg']:''?>" /></div>
                            <div class="fileupload-preview fileupload-exists thumbnail" style="width: 200px;height: 100px;text-align: center;"></div>
                            <div>
                                <span class="btn btn-file"><span class="fileupload-new">浏览</span><span class="fileupload-exists">重选</span>
            					<input type="file" name='specialimg' title="" />
            					</span>
                                <a href="#" class="btn fileupload-exists" data-dismiss="fileupload">移除</a>
                            </div>
                        </div>
                    </div>
                </div>
                <input type="hidden" class="form-control" name="safeimg" value="<?=empty($rs)?'':$rs['safeimg']?>">
                <div class="form-group" style="margin-top: 10px;">
                    <label class="col-sm-2 control-label"><span style="color:red;">* </span>消防安全检查合格证：</label>
                    <div class="col-sm-10">
                        <div class="fileupload fileupload-new" data-provides="fileupload">
                            <div class="fileupload-new thumbnail" style="width: 200px;height: 100px;text-align: center;line-height: 100px;"><img src="<?=!empty($rs)&&!empty($rs['safeimg'])?$rs['safeimg']:''?>" /></div>
                            <div class="fileupload-preview fileupload-exists thumbnail" style="width: 200px;height: 100px;text-align: center;"></div>
                            <div>
                                <span class="btn btn-file"><span class="fileupload-new">浏览</span><span class="fileupload-exists">重选</span>
            					<input type="file" name='safeimg' title="" />
            					</span>
                                <a href="#" class="btn fileupload-exists" data-dismiss="fileupload">移除</a>
                            </div>
                        </div>
                    </div>
                </div>
                <input type="hidden" class="form-control" name="businessimg" value="<?=empty($rs)?'':$rs['businessimg']?>">
                <div class="form-group" style="margin-top: 10px;">
                    <label class="col-sm-2 control-label"><span style="color:red;">* </span>营业执照：</label>
                    <div class="col-sm-10">
                        <div class="fileupload fileupload-new" data-provides="fileupload">
                            <div class="fileupload-new thumbnail" style="width: 200px;height: 100px;text-align: center;line-height: 100px;"><img src="<?=!empty($rs)&&!empty($rs['businessimg'])?$rs['businessimg']:''?>" /></div>
                            <div class="fileupload-preview fileupload-exists thumbnail" style="width: 200px;height: 100px;text-align: center;"></div>
                            <div>
                                <span class="btn btn-file"><span class="fileupload-new">浏览</span><span class="fileupload-exists">重选</span>
            					<input type="file" name='businessimg' title="" />
            					</span>
                                <a href="#" class="btn fileupload-exists" data-dismiss="fileupload">移除</a>
                            </div>
                        </div>
                    </div>
                </div>
                
                <input type="hidden" name="old_log" value="<?=!empty($rs)&&!empty($rs['logo'])?$rs['logo']:''?>" />
                <div class="form-group">
                    <div class="col-sm-4 col-sm-offset-2">
                        <button type="button" onclick="window.history.go(-1);" class="btn btn-default">返 回</button>
                        <button type="submit" class="btn btn-primary show_shadefrist">保 存</button>
                        <button type="reset" class="btn btn-primary">重 置</button>
                    </div>
                </div>
            </form>
            </div>
        </section>
    </section>
</section>
<a href="#" class="hide nav-off-screen-block" data-toggle="class:nav-off-screen" data-target="#nav"></a>
<script type="text/javascript">

$(function(){
    $(".sta").datepicker({
        showMonthAfterYear: true,
        changeMonth: true,
        numberOfMonths: 1,
        showButtonPanel: true,
        showOn: "both",
    });
    $('.ui-datepicker-trigger').remove();
});

$('select[name="data[province]"]').change(function(){
    var provinceid=$('select[name="data[province]"] option:selected').val();
    onseleted(1,provinceid);
});
$('select[name="data[city]"]').change(function(){
    var cityid=$('select[name="data[city]"] option:selected').val();
    onseleted(2,cityid);
});
function onseleted(type,parentid){
    $.ajax({
        type:'post',
        url:"<?=$this->url('user/get_address')?>",
        data:"type="+type+"&parentid="+parentid,
        dataType:'json',
        success:function (msg){
            if(msg.type==1){
                $('select[name="data[city]"]').html(msg.html);
                $('select[name="data[county]"]').html("<option value='0'>请选择</option>");
            }else if(msg.type==2){
                $('select[name="data[county]"]').html(msg.html);
            }
        },error:function(){
            pub_alert_error("ajax错误",2000);
        }
    });
}
</script>